package com.sky.mapper;

import com.sky.entity.AddressBook;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2023/8/20 11:56
 * @Version 1.0.0
 */
@Mapper
public interface AddressBookMapper {

    List<AddressBook> list (Long userId);

    AddressBook defaultAddress (Long userId);

    void saveAddress(AddressBook addressBook);

    AddressBook selectById(Long id);

    void updateAddress(AddressBook addressBook);

    void deleteById(Long id);

    void updateDefaultByUser(Long userId);

    void setDefaultAddress(Long id);
}
